<template>
  <div id="app">
    <!-- <h1 v-upper="msg"></h1> -->
    <Header></Header>
    <!-- 路由组建的出口处 -->
    <router-view></router-view>
    <!-- 在 Home、Search 显示 在Login、Register隐藏 -->
    <!-- <Footer v-show="$route.path=='/home' || $route.path=='/search'"></Footer> -->
    <Footer v-show="$route.meta.show"></Footer>
  </div>
</template>

<script>
import Header from "./components/Header";
import Footer from "./components/Footer";
export default {
  name: "",
  data() {
    return {
      msg: "abc"
    }
  },
  components: {
    Header,
    Footer,
  },
  mounted() {
    // 通知 Vuex 发请求 存储于仓库当中
    this.$store.dispatch("categoryList");
  },
};
</script>

<style scoped></style>
